<?php
$this->breadcrumbs=array(
        'Galeria'=>array('tbl_galeria/index'),
	'Geranciar Galeria('.Yii::app()->user->name.')',
);
echo $this->renderPartial('_menu', array('menu_users'=>$menu_users));
?>
<?php $this->widget('zii.widgets.grid.CGridView', array(
	'id'=>'tbl-galeria-grid',
        'pager' => array('cssFile' => Yii::app()->baseUrl . '/themes/'.Yii::app()->theme->name.'/gridView.css'),
        'cssFile' => Yii::app()->baseUrl . '/themes/'.Yii::app()->theme->name.'/css/gridView.css',
        'summaryText' => 'De {start} - {end} entre {count} records',
        'htmlOptions' => array('class' => 'grid-view rounded'),
	'dataProvider'=>$model->mySearch(),
	//'filter'=>$model,
	'columns'=>array(
		'name',
		'author',
		 array(
                    'name'=>'link',
                    'type'=>'image',
                    'value'=> 'Yii::app()->baseUrl.  "/images/" .$data->link',
                ),
		array(
			'class'=>'CButtonColumn',
                        'afterDelete'=>'function(link,success,data){ if(success) alert("Delete completed successfuly"); }',
		),
	),
)); ?>
